<!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
<stack>
<name>in</name>
<id>-1</id>
<cardCount>2</cardCount>
<cardID>3757</cardID>
<listID>4804</listID>
<cantModify><false /></cantModify>
<cantDelete><true /></cantDelete>
<cantAbort><true /></cantAbort>
<cardSize>
<width>512</width>
<height>384</height>
</cardSize>
<script>on openstackglobal mesme,errset the cantabort of this stack to trueset the cantpeek of this stack to trueset cursor to watchshow btn 7 of card 1hide btn 1 of card 1show btn 3 of card 1hide btn 4 of card 1hide btn 5 of card 1hide btn 6 of card 1repeat until the lockscreen is falseunlock screenend repeatcHCinstallif err ≠ ""thenput "" into errchcdisposeset lockmessages to truego homeexit openstackend iflock screenchcdisposeif the number of this card = 1thenif mesme = "" then col "0,0,512,384"elsecolorizeHC "colorFill","0,0,512,384",mesmeput "" into mesmeend ifelseif cd fld sauver = "" then colorizehc "colorfill",rect of btn id 371,fld monéchiquierelse colorizehc "colorfill",rect of btn id 371,item 4 to 6 of line 11 of cd fld sauverend ifset style of btn id 371 of card 2 to opaqueshow btn id 371 of card 2unlock screenset cursor to busysend place to btn id 279 of card 2get checkHCFont("Courier","32") & checkHCFont("Geneva","14") & ¬checkHCFont("Helvetica","16") & checkHCFont("Symbol","52") & ¬checkHCFont("Times","128")if it is empty thenelseput it into missingFontsrepeat with i = 1 to the number of lines of missingfontsput " " & word 1 of line i of missingfonts & "," after tiend repeatif the number of lines of missingfonts > 1then put "des polices" before tielseput "de la police" before tidelete last char of tiend ifbeepanswer "Mosaïcon requiert la présence " & ti & " dans le système."chcdisposeset lockmessages to truego homeexit openstackend ifput "" into cd fld couleurs of card 2put "" into cd fld suspendre of card 2put the userlevel into line 2 of fld "bonjour"set userlevel to 3if the number of this card = 1thenhide btn 7colorizeHC "colorfill","220,202,290,220","65535,65535,65535"chcolorizeHC "add","taceo",rect of btn 6chshow btn 1chreset menubarchhide btn 1if "aide mosaïcon" is not in line 2 to (the number of lines of the stacks) of the stacksthenshow btn 4show btn 6put "Patrick DOGLIANI 1994" into auteurset name of btn 3 to char 1 of auteurget short name of btn 3repeat with a = 2 to the number of chars of auteurput char a of auteur after itif last char of it ≠ " " then play toucheelse play espaceset name of btn 3 to itwait until the sound is doneend repeatshow cd fld cadrewait 2 secplay retourset name of btn 3 to ""lock screenhide cd fld cadrehide btn 3hide btn 4hide btn 6unlock screenelsehide btn 3end ifend ifend openstackon col xput ",," into macouleurrepeat with a = 1 to 3put random (65535) into item a of macouleurend repeatlock screencolorizeHC "colorFill",x,macouleurunlock screenend colon chlock screencolorizehc "add","intro2","240,171"unlock screenlock screencolorizehc "add","intro1","240,171"unlock screenend chon transitoire gput "" into cd fld gput "1 3 4 5 6 7 9 10 11 12 13 14 16 17" into qlmenrepeat with b = 1 to the number of words of qlmenif g = "couleurs" and b ≥ 8 then exit repeatput (menuitem word b of qlmen of menu 5) & "," & (the enabled of menuitem word b of qlmen of menu 5) & "," & (the checkmark of menuitem word b of qlmen of menu 5) & ¬"," into line word b of qlmen of cd fld gif b = 1then put short name of btn id 294 & "," & icon of btn id 294 after line b of cd fld gelse if b = 10then put short name of btn 1 after line b of cd fld gelse if b = 11then put fld monéchiquier & "," & short name of btn id 278 & "," & fld mespièces & "," & style of btn id 278 after line b of cd fld gelse if b = 12then put the rect of card window after line b of cd fld gelse if b = 13thenput icon of btn id 269 & "," & short name of btn id 269 after line b of cd fld gput cd fld notes into line 50 of cd fld gelse if b = 14then put cd fld touches into line 100 of cd fld gend repeatif g = sauverthenif "card" is not in short name of btn id 195 then put short name of btn id 195 into line 47 of cd fld sauverif "card" is not in short name of btn id 352 then put short name of btn id 352 into line 48 of cd fld sauverif "card" is not in short name of btn id 296 then put short name of btn id 296 into line 49 of cd fld sauverend ifend transitoireon actualiser gput "niveau,,aveugle,pénalités,compteur,verlan,minuterie,,Clignotement,curseur,Damier,écran,son,clavier,,déplacer,musique" into menmesrepeat with a = 1 to 17if a ≥ 8 and g = couleurs then exit repeatelse if line a of cd fld g = "" then next repeatput item 1 of line a of cd fld g into menuitem a of menu 5 with menumessages item a of menmesif g = "sauver" then set the enabled of menuitem a of menu 5 to trueelse set the enabled of menuitem a of menu 5 to (item 2 of line a of cd fld g)set the checkmark of menuitem a of menu 5 to (item 3 of line a of cd fld g)end repeatset commandchar of menuitem 1 of menu 5 to "J"end actualiseron changermenussend menus to btn àbase of card 2end changermenuson rienlock screensetvolume 1set name of btn id 195 to ""set name of btn id 352 to ""set name of btn id 296 to ""get script of btn Àbaseput "on mouseup" into line 1 of itset script of btn Àbase to itset style of btn "quitter" to transparentget script of btn quitterrepeat with a = 60 to 62if "--" is in char 1 to 2 of word 1 of line a of itthen delete char 1 to 2 of word 1 of line a of itend repeatset script of btn quitter to itget script of btn retourput "on mouseup" into line 1 of itset script of btn retour to itget the script of btn optionsif "5 5" is not in last line of it then put "5 5" into last line of itset the script of btn options to itset showname of btn "compt" to trueset showname of btn "niveau" to trueset showname of btn "chrono" to trueset icon of btn id 294 to "un"set name of btn id 294 to "Niveau 1"désactiver "1 4 7",3,trueget script of card 2put "-- on idle" into line 1 of itset script of card 2 to itput "- - . - - . - -" into cd fld temps of card 2put "- -" into cd fld coups of card 2put "" into cd fld décompte of card 2set name of btn 1 to "M128 1"put "40703,40128,40559" into fld "monéchiquier"set name of btn id 278 to "persostandard"put "standard" into fld mespiècesset style of btn id 278 to transparentset the checkmark of menuitem 3 of menu 5 to truesend aveugle to btn id 230set icon of btn id 269 to 32233set name of btn id 269 to "son1"set style of btn "inversion" to transparentset style of btn "bonusmalus" to transparentset name of bkgnd btn 10 to "blanc2"put "Curseur : 1" into menuitem 10 of menu 5 with menumessages curseurput "1" & return & "2" & return & "3" & return & "4" & return & "6" & return & "7" & return & "8" & return & "9" & return into cd fld touchesrepeat with a = 1 to 8put the chartonum of char 1 of line a of cd fld touches into line a + 9 of cd fld touchesend repeatput 8 into line 18 of cd fld touchesunlock screenend rienon effacerif the number of this card ≠ 2 then exit effacerif item 1 to 49 of line 1 of cd fld solution = ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"thenanswer "Il n'y a rien à effacer …" & return & return & "Dessinez d'abord une mosaïque sur le grand damier."exit effacerend ifanswer "Voulez-vous vraiment effacer la mosaïque ?" with "Annuler" or "OK"if the visible of btn "jouer1" is truethenif it is "annuler" then exit effacerelse send effacement to btn créerelseif it is "annuler" then exit effacerelse send effacement to btn jouerend ifend effaceron compacterdomenu "compact stack"end compacteron pourrejouerif the number of this card ≠ 2 then exit pourrejouersend pourrejouer to btn quitterend pourrejoueron sauvejeusend sauvejeu to btn quitterend sauvejeuon curseurif the commandkey is down and the shiftkey is down then send recrues to btn "àbase"else send curseur to btn "àbase"end curseuron damiersend mousebis to btn id 278end damieron fermerdomenu "close stack"end fermeron importsend import to btn retourend importon exportsend export to btn retourend exporton formesend forme to btn àbaseend formeon commandkeydown xif the number of this card < 2 then pass commandkeydownif x = " "thenif style of btn "Mosaïcon " = opaquethenhide menubarset style of btn "Mosaïcon " to transparentelseshow menubarset style of btn "Mosaïcon " to opaqueend ifelse if x = "?"then alleraideelse if x is in "123456"then send direct && x to btn id 294else if x is in "+"then send volume && plus to btn id 269else if x is in "-"then send volume && moins to btn id 269else pass commandkeydownend commandkeydownon Àproposdesend kwad9 to btn quitterend Àproposdeon Jouerif the number of this card ≠ 2 then exit jouerif "interrompre" is in menuitem 1 of menu 2thenif visible of btn "jouer1" is truethenanswer "Voulez-vous vraiment interrompre le dessin ?" with "Annuler" or "OK"if it is "annuler" then exit jouerelse send arrêt to btn créerelseanswer "Voulez-vous vraiment interrompre la partie ?" with "Annuler" or "OK"if it is "annuler" then exit jouerelse send findepartie to btn jouerend ifelseset the style of btn "Jouer" to "transparent"send ssbruit to btn cloneend ifend joueron ouvrirdomenu "open stack..."end ouvriron alleraideset the checkmark of menuitem 1 of menu 4 to truelock screencolorizeHC "add","btnaidealvert",item 1 to 2 of rect of btn id 217unlock screengo stack "Aide Mosaïcon" in a new windowif the result is "cancel" then send échec to btn aideend alleraideon allerbaseset hilite of btn "Àbase" to truewait 4 ticksset hilite of btn "Àbase" to falsesend sansson to btn "Àbase"end allerbaseon créerif the number of this card ≠ 2 then exit créerif "interrompre" is in menuitem 3 of menu 3thenanswer "Voulez-vous vraiment interrompre le dessin ?" with "Annuler" or "OK"if it is "annuler" then exit créerelse send arrêt to btn créerelsedisable menuitem 3 of menu 3send ssbruit to btn sosieend ifend créeron enregistrerif the number of this card ≠ 2 then exit enregistrerlock screencolorizehc "add","btnenregistreral","(item 1 of rect of btn enregistrer),(item 2 of rect of btn enregistrer)"unlock screensend sansclic to btn "enregistrer"end enregistreron analyserif the number of this card ≠ 2 then exit analysersend sansbruit to btn "analyser"end analyseron supprimerif the number of this card ≠ 2 then exit supprimersend corbeille to btn id 224end supprimeron autrepilego line 2 of the stacksend autrepileon revenirset hilite of btn "retour" to truewait 4 ticksset hilite of btn "retour" to falsego backend reveniron barremenusif style of btn "Mosaïcon " is transparentthenset style of btn "Mosaïcon " to opaqueshow menubarelseset style of btn "Mosaïcon " to transparenthide menubarend ifend barremenuson niveausend niveau to btn id 294end niveauon aveuglesend aveugle to btn id 230end aveugleon compteursend doubleclic to btn "compt"end compteuron verlansend activer to btn "inversion"end verlanon verserglobal inversionlock screenhide bkgnd btn 1set icon of btn "Nord" to FNNset icon of btn "Nord-Est" to FNNEset icon of btn "Est" to FNEset icon of btn "Sud-Est" to FNSEset icon of btn "Sud" to FNSset icon of btn "Sud-Ouest" to FNSOset icon of btn "Ouest" to FNOset icon of btn "Nord-Ouest" to FNNOunlock screenput "" into inversionend verseron minuteriesend doubleclic to btn "chrono"end minuterieon pénalitéslock screencolorizeHC "add","btnB/Mal",item 1 to 2 of rect of btn "bonusmalus"unlock screensend activer to btn "bonusmalus"end pénalitéson écransend mouseup to btn id 279end écranon sonsend son to btn id 269end sonon claviersend chgertouches to btn id 312end clavieron déplacerif the checkmark of menuitem 16 of menu 5 is falsethenif visible of btn "jouer1" is true then palette "navigation","382,34"else palette "navigation","382,255"set the checkmark of menuitem 16 of menu 5 to trueelseif there is a window navigation then close window navigationset the checkmark of menuitem 16 of menu 5 to falseend ifend déplaceron musiqueglobal partitionif there is no window "clavier"thenpalette "clavier","20,235"set the checkmark of menuitem 17 of menu 5 to trueelseclose window "clavier"set the checkmark of menuitem 17 of menu 5 to falseput "" into partitionend ifend musiqueon sauvegardersend sauvegarder to btn quitterend sauvegarderon griser x,yif y = true then put "macgris2" into étatelse put "" into étatrepeat with a = 1 to the number of items of param of 1set icon of (item a of x) to étatend repeatend griseron motifglobal tycput "" into tycget handleItem(CtlValue,23)if it = 1thensend forme to btn àbaseif tyc = "" then cachermotifelse get handleItem(Visible,tyc+23,show)else cachermotifend motifon cachermotifglobal tycput "" into tycput "" into fld formesget handleItem(CtlValue,23,0)repeat with a = 24 to 33get handleItem(Visible,a,hidden)end repeatend cachermotifon quelleformeglobal tycanswer "Souhaitez-vous utiliser un motif particulier pour l'affichage de cette mosaïque ?" with "Non" or "OK"unlock screenif it = okthensend forme to btn àbaseif tyc = "" then aleasymbelse send affsymb to btn àbaseelseif fld formes = ""thenif the number of items of cd fld combinaison = 50then put item 50 of cd fld combinaison into fld formeselse aleasymbend ifend ifset cursor to watchlock screenend quelleformeon aleasymbput "hdsfjklqmghdsfjklqmghdsfjklqmghdsfjklqmghdsfjklqmg" into figput "" into fld formesrepeat 50put random (the number of chars of fig) into hazput char haz of fig after fld formesdelete char haz of figend repeatput a before fld formesend aleasymbon testinversionglobal inversion,unpostinv,reptestif last word of short name of btn id 294 is in "56" then send test56 to btn créerif reptest ≠ ""thenput "" into reptestexit testinversionelse put "" into reptestif "oui" is in inversionthenhide bkgnd btn 1put "Inversion" into cd fld tempsput "" into inversionput "0" into unpostinvlock screeninverser Nord,Sud,FNN,FNSinverser "Sud-Ouest","Nord-Est",FNSO,FNNEinverser Ouest,Est,FNO,FNEinverser "Nord-Ouest","Sud-Est",FNNO,FNSEelseshow bkgnd btn 1put "Inversion" into cd fld tempsput "oui" into inversionput "0" into unpostinvlock screeninverser Nord,Sud,FBN,FBSinverser "Nord-Ouest","Sud-Est",FBNO,FBSEinverser Ouest,Est,FBO,FBEinverser "Sud-Ouest","Nord-Est",FBSO,FBNEend ifunlock screenif icon of btn id 269 = "0"thenplay stopplay dringend ifput "- - . - - . - -" into cd fld tempsput "" into reptestend testinversionon inverser f,g,h,ilock screenset icon of btn f to hset icon of btn g to iunlock screenend inverseron flèche w,x,y,zif the visible of bkgnd btn 1 is truethenlock screenset hilite of bkgnd btn z to trueset icon of btn w to xunlock screenlock screenset hilite of bkgnd btn z to falseset icon of btn w to yunlock screenelselock screenset hilite of bkgnd btn z to trueset icon of btn w to yunlock screenlock screenset hilite of bkgnd btn z to falseset icon of btn w to xunlock screenend ifend flècheon désactiver a,b,crepeat with d = 1 to the number of words of aif c = "true" then disable menuitem (word d of a) of menu belse enable menuitem (word d of a) of menu bend repeatend désactiveron aurevoirdomenu "quit hypercard"end aurevoiron ODplay (word 1 of line 9 of cd fld notes) cend ODon RÉplay (word 1 of line 9 of cd fld notes) dend RÉon MIplay (word 1 of line 9 of cd fld notes) eend MIon FAplay (word 1 of line 9 of cd fld notes) fend FAon SOLplay (word 1 of line 9 of cd fld notes) gend SOLon LAplay (word 1 of line 9 of cd fld notes) aend LAon SIplay (word 1 of line 9 of cd fld notes) bend SIon info36 wif (style of btn créer = transparent and style of btn jouer = transparent) then exit info36if w = 117thenif item (short name of btn id 142)-1 of cd fld combinaison = "" or return is in item (short name of btn id 142)-1 of cd fld combinaisonthen put "ø" into cd fld tempselse put item (short name of btn id 142)-1 of cd fld combinaison into cd fld tempselse if w ≥ 52thenif item (w)-51 of cd fld combinaison = "" or return is in item (w-51) of cd fld combinaisonthen put "ø" into cd fld tempselse put item (w)-51 of cd fld combinaison into cd fld tempselseif item w-1 of cd fld solution = ""then put "ø" into cd fld tempselse put item w-1 of cd fld solution into cd fld tempsend ifwait 2 secondsput "- - . - - . - -" into cd fld tempsend info36on infodestif last word of short name of btn id 294 is not in "36" ¬or (style of btn créer = transparent and style of btn jouer = transparent) then exit infodestif item (short name of btn id 142)-1 of cd fld solution = ""then put "ø" into cd fld tempselse put item (short name of btn id 142)-1 of cd fld solution into cd fld tempswait until the mouse is upput "- - . - - . - -" into cd fld tempsend infodeston perso x,y,z,w,vglobal dest,libre,combien,parkalei,ssclr,antér,quelledirif libre = "" or combien = "0" or the enabled of menuitem 4 of menu 5 is falsethen exit persoput char 7 of x into ssclrlock screencolorizeHC "add","barrevoyantsét","381,142"unlock screenput v into parkaleilock screencolorizeHC "add",x,ysend voyant to btn jouerput x & "," & y into antérif (the number of words of item dest-1 of cd fld solution ≥ 3 and last word of short name of btn id 294 = 6) or ¬(last char of word 1 of item dest-1 of cd fld solution = 3 and last word of short name of btn id 294 is in "45") then exit persocolorizehc "add","ptbtn" & ssclr & "2",rect of btn destcolorizehc "add",quelledir,rect of btn 1end persoon cHCdisposelock screencolorizeHC "dispose"unlock screenend cHCdisposeon net xif x = "" then put 100 into prelse put x into prlock screenrepeat with i = pr down to 52set showname of btn (i-50) to trueset name of btn (i-50) to ""set style of btn (i-50) to transparentset style of btn (i) to rectangleend repeatend neton lampset textstyle of btn "compt" to plainset textstyle of btn "chrono" to plainend lampon closeStacksend closestack to btn àbase of card 2end closeStackon openbackgroundglobal kaleireset menubarlock screenset icon of btn 1 of card 2 to venispass openbackgroundend openbackgroundon suspendstackglobal mesme,psto,déb,prolput "" into prolif psto ≠ "" and déb ≠ "" then put the seconds into prolset cursor to watchif the number of this card = 2 then transitoire "suspendre"if "interrompre" is in menu 2 then put "jouer" into line 300 of cd fld suspendreelse if "interrompre" is in menu 3 then put "créer" into line 300 of cd fld suspendreset userlevel to line 2 of fld "bonjour"put fld monéchiquier into mesmeset style of btn id 371 to opaquelock screencolorizehc "colorfill",rect of btn id 371,fld monéchiquiervoiler trueunlock screenif symb is in menu 5 or style of btn id 278 = opaquethenrepeat with a = 2 to 50set name of btn a to ""end repeatend ifplay stopif "interrompre" is not in menu 2 and "interrompre" is not in menu 3then put "- - . - - . - -" into cd fld tempsreset menubarlock screenchcdisposelock screenshow menubarend suspendstackon resumestackglobal prol,déb,finset the cantabort of this stack to trueset the cantpeek of this stack to truelock screenchcdisposecolorizehc "assigntofront"set userlevel to 3lock screencolorizehc "colorfill",rect of btn id 371,fld monéchiquierrepeat until the lockscreen is falseunlock screenend repeatchangermenusif "interrompre" is not in menuitem 1 of menu 2 and "interrompre" is not in menuitem 3 of menu 3thensend affichage to this backgroundshow btn 1else send reconstruire to btn retourvoiler falserepeat until the lockscreen is falseunlock screenend repeatput "" into cd fld suspendreif prol ≠ ""thenput the seconds-prol into duradd dur to débconvert fin to secondsadd dur to finconvert fin to long timeput "" into prolend ifend resumestackon cHCinstallglobal errif checkEnviron() is not "OK"thenput "oui" into errend ifend cHCinstallfunction checkEnvironglobal errput MaxDepth() into TheDepthif TheDepth < 8thenbeepanswer "Mosaïcon ne fonctionne qu'en mode 8 bits (256 couleurs)."put "oui" into errend ifif stackActivate() is not emptythenerrColorelse return "OK"end checkEnvironfunction stackActivateglobal gOKToColorizeput empty into gOKToColorizecolorizeHC "assignToFront"if the result is not empty thenput the result into gOKToColorizereturn gOKToColorizeend ifend stackActivateon errColorglobal gOKToColorizebeepanswer "Mosaïcon nécessite d'allouer à HyperCard au moins 2000 ko de mémoire vive." & return & returnend errColoron voiler xlock screenif x = truethenset hilite of btn id 371 to trueshow btn voile of card 2elseset hilite of btn id 371 to falsehide btn voile of card 2end ifunlock screenend voiler</script>